package com.example.cybz.acl.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.cybz.acl.mapper.AdminRoleMapper;
import com.example.cybz.acl.service.AdminRoleService;
import com.example.cybz.model.acl.AdminRole;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminRoleServiceImpl extends ServiceImpl<AdminRoleMapper, AdminRole> implements AdminRoleService {

    @Override
    public List<AdminRole> selectRoleByUserId(Long admin) {
        return new LambdaQueryChainWrapper<>(baseMapper)
                .eq(AdminRole::getAdminId, admin)
                .list();
    }
}
